// ReactorEx2.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "Default.h"
#include "AlarmEvent.h"
#include "LogEvent.h"
#include "PatientEvent.h"
#include "Reactor.h"

int _tmain(int argc, _TCHAR* argv[])
{
	// Creates reactor 
	Reactor *itsReactor = Reactor::instance();

	// Register event handlers
	itsReactor->registerHandler(*(new AlarmEvent(itsReactor)), ALARM_EVENT);
	itsReactor->registerHandler(*(new LogEvent(itsReactor)), LOG_EVENT);
	itsReactor->registerHandler(*(new PatientEvent(itsReactor)), PATIENT_EVENT);
	
	// Simulate generating events (Alarm, Log and Patient)
	itsReactor->handleEvents();

	Sleep(2000);

	return 0;
}

